package com.lianzhihui.romeex.mvp.presenter;

import android.content.Context;

import com.lianzhihui.romeex.mvp.model.SyncUserInterface;
import com.lianzhihui.romeex.mvp.model.SyncUserModel;
import com.lianzhihui.romeex.mvp.view.SyncUserView;

/**
 * Description:
 * Author: RAMON
 * CreateDate: 2020/11/10 10:26 AM
 * UpdateUser:
 * UpdateDate:
 * UpdateRemark:
 * Version:
 */
public class SyncUserPresenter implements SyncUserInterface {

    Context context;
    SyncUserView iView;
    SyncUserModel iModel;

    public SyncUserPresenter(Context context, SyncUserView iView) {
        this.context = context;
        this.iView = iView;
        iModel = new SyncUserModel(context, this);
    }

    public void syncUser(String address) {
        iModel.syncUser(address);
    }

    @Override
    public void onSync() {
        iView.onSync();
    }

    @Override
    public void onSyncFail(Object obj) {
        iView.onSyncFail(obj);
    }
}
